//
//  DPModel.m
//  DrinkingPlan
//
//  Created by 张德广 on 2019/3/15.
//  Copyright © 2019 Drinking Plan. All rights reserved.
//

#import "DPModel.h"

@implementation DPModel

- (void)encodeWithCoder:(NSCoder *)aCoder {
    
    [aCoder encodeObject:self.currentTime forKey:@"currentTime"];
    [aCoder encodeObject:self.time forKey:@"time"];
    [aCoder encodeObject:self.water forKey:@"water"];
    [aCoder encodeObject:self.notice forKey:@"notice"];
    [aCoder encodeObject:self.status forKey:@"status"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    
    if (self = [super init]) {
        self.currentTime = [aDecoder decodeObjectForKey:@"currentTime"];
        self.time = [aDecoder decodeObjectForKey:@"time"];
        self.water = [aDecoder decodeObjectForKey:@"water"];
        self.notice = [aDecoder decodeObjectForKey:@"notice"];
        self.status = [aDecoder decodeObjectForKey:@"status"];
    }
    return self;
}

@end
